import request from "@/utils/request.js";

// 获取预案编制列表
export const getPlanList = (data, query = {}) => {
    return request({
        method: 'post',
        url: '/bussiness/PLAN/list',
        params: query,
        data: data,
        isEncrypt: false
    })
}

// 获取预案查询
export const getUnitPlanList = (data, query = {}) => {
    return request({
        method: 'post',
        url: '/bussiness/PLAN/unitPlanList',
        params: query,
        data: data,
        isEncrypt: false
    })
}

// 新增预案编制
export const createPlan = (data) => {
    return request({
        method: 'post',
        url: '/bussiness/PLAN/add',
        data: data,
        isEncrypt: false
    })
}

// 修改预案编制
export const updatePlan = (data) => {
    return request({
        method: 'post',
        url: '/bussiness/PLAN/edit',
        data: data,
        isEncrypt: false
    })
}

// 删除预案编制
export const deletePlan = (id) => {
    return request({
        method: 'post',
        url: '/bussiness/PLAN/remove',
        params: {
            id: id
        },
        isEncrypt: false
    })
}

// 获取预案详情
export const getPlanInfo = (id) => {
    return request({
        method: 'get',
        url: '/bussiness/PLAN/info',
        params: {
            id: id
        },
        isEncrypt: false
    })
}


// 获取部门领导审批预案列表
export const getDeptLeaderPlanList = (data, query = {}) => {
    return request({
        method: 'post',
        url: '/bussiness/PLAN/depConfirmlist',
        params: query,
        data: data,
        isEncrypt: false
    })
}
// 部门领导审批预案审核
export const deptLeaderPlanAudit = (data) => {
    return request({
        method: 'post',
        url: '/bussiness/PLAN/depConfirm',
        data: data,
        isEncrypt: false
    })
}
// 部门领导审批预案回退
export const deptLeaderPlanBack = (data) => {
    return request({
        method: 'post',
        url: '/bussiness/PLAN/returnDepConfirm',
        data: data,
        isEncrypt: false
    })
}

// 获取分管领导审批预案列表
export const getFgLeaderPlanList = (data, query = {}) => {
    return request({
        method: 'post',
        url: '/bussiness/PLAN/unitConfirmlist',
        params: query,
        data: data,
        isEncrypt: false
    })
}
// 分管领导审批预案审核
export const fgLeaderPlanAudit = (data) => {
    return request({
        method: 'post',
        url: '/bussiness/PLAN/unitConfirm',
        data: data,
        isEncrypt: false
    })
}
// 分管领导审批预案回退
export const fgLeaderPlanBack = (data) => {
    return request({
        method: 'post',
        url: '/bussiness/PLAN/returnUnitConfirm',
        data: data,
        isEncrypt: false
    })
}

// 获取预案下拉列表
export const getPlanNameSelectList = () => {
    return request({
        method: 'post',
        url: '/bussiness/PLAN/queryList',
        data: {},
        isEncrypt: false
    })
}